package com.polymorphic.detail;

/**
 * @Author 小闽
 * @Date 2024/8/12 16:16
 * @PackageName: com.polymorphic.detail
 * @ClassName: PolyDetail02
 * @Description: 多态细节
 * @Version 1.0
 */
public class PolyDetail02 {
    public static void main(String[] args) {
        /**
         * 属性没有重写之说，属性的值看编译类型
         */
        Base base = new Sub();
        System.out.println(base.count);
        Sub sub = new Sub();
        System.out.println(sub.count);
    }
}
